// 博客相关方法
const getList = (author, kerword) => {
  // 从数据库里拿数据
  return [
    {
      id: 1,
      title: '标题1',
      content: '内容1',
      author: '张三',
      createdAt: 1610555518935,
    },
    {
      id: 2,
      title: '标题2',
      content: '内容2',
      author: '66',
      createdAt: 161055559999,
    },
  ]
}

// 获取博客详情
const getDetail = id => {
  return {
    id: id,
    title: '标题1',
    content: '内容1',
    author: '张三',
    createdAt: 1610555518935,
  }
}

// 创建新博客
const createNewBlog = (blogData = {}) => {
  return {
    id: 1,
  }
}

// 更新博客
const updateBlog = (id, blogData = {}) => {
  return true
}

// 删除博客
const deleteBlog = id => {
  return false
}
module.exports = {
  getList,
  getDetail,
  createNewBlog,
  updateBlog,
  deleteBlog,
}
